* A test for overlapping whiteboard servlets

This is a test application created to test how the [[http://ops4j.github.io/pax/web/SNAPSHOT/User-Guide.html#whiteboard-extender][Pax Web Whiteboard Extender]] handles overapping paths from two servlets exposed by two different DS components.

The webapp servlet will install on /overlap/ and the REST service servlet will install on /overlap/api/testservice

** Status

[[https://github.com/steinarb/whiteboard-web-and-api-karaf-demo/actions/workflows/whiteboard-web-and-api-karaf-demo-maven-ci-build.yml][file:https://github.com/steinarb/whiteboard-web-and-api-karaf-demo/actions/workflows/whiteboard-web-and-api-karaf-demo-maven-ci-build.yml/badge.svg]]
[[https://coveralls.io/github/steinarb/whiteboard-web-and-api-karaf-demo][https://coveralls.io/repos/github/steinarb/whiteboard-web-and-api-karaf-demo/badge.svg]]
[[https://sonarcloud.io/summary/new_code?id=steinarb_whiteboard-web-and-api-karaf-demo][file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_whiteboard-web-and-api-karaf-demo&metric=alert_status#.svg]]
[[https://maven-badges.herokuapp.com/maven-central/no.priv.bang.demos.whiteboardwebapi/whiteboard-web-and-api-karaf-demo][file:https://maven-badges.herokuapp.com/maven-central/no.priv.bang.demos.whiteboardwebapi/whiteboard-web-and-api-karaf-demo/badge.svg]]

[[https://sonarcloud.io/summary/new_code?id=steinarb_whiteboard-web-and-api-karaf-demo][file:https://sonarcloud.io/images/project_badges/sonarcloud-white.svg]]

[[https://sonarcloud.io/summary/new_code?id=steinarb_whiteboard-web-and-api-karaf-demo][file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_whiteboard-web-and-api-karaf-demo&metric=sqale_index#.svg]]
[[https://sonarcloud.io/summary/new_code?id=steinarb_whiteboard-web-and-api-karaf-demo][file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_whiteboard-web-and-api-karaf-demo&metric=coverage#.svg]]
[[https://sonarcloud.io/summary/new_code?id=steinarb_whiteboard-web-and-api-karaf-demo][file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_whiteboard-web-and-api-karaf-demo&metric=ncloc#.svg]]
[[https://sonarcloud.io/summary/new_code?id=steinarb_whiteboard-web-and-api-karaf-demo][file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_whiteboard-web-and-api-karaf-demo&metric=code_smells#.svg]]
[[https://sonarcloud.io/summary/new_code?id=steinarb_whiteboard-web-and-api-karaf-demo][file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_whiteboard-web-and-api-karaf-demo&metric=sqale_rating#.svg]]
[[https://sonarcloud.io/summary/new_code?id=steinarb_whiteboard-web-and-api-karaf-demo][file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_whiteboard-web-and-api-karaf-demo&metric=security_rating#.svg]]
[[https://sonarcloud.io/summary/new_code?id=steinarb_whiteboard-web-and-api-karaf-demo][file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_whiteboard-web-and-api-karaf-demo&metric=bugs#.svg]]
[[https://sonarcloud.io/summary/new_code?id=steinarb_whiteboard-web-and-api-karaf-demo][file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_whiteboard-web-and-api-karaf-demo&metric=vulnerabilities#.svg]]
[[https://sonarcloud.io/summary/new_code?id=steinarb_whiteboard-web-and-api-karaf-demo][file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_whiteboard-web-and-api-karaf-demo&metric=duplicated_lines_density#.svg]]
[[https://sonarcloud.io/summary/new_code?id=steinarb_whiteboard-web-and-api-karaf-demo][file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_whiteboard-web-and-api-karaf-demo&metric=reliability_rating#.svg]]
** How to install

This is how to build and install the servlet:
 1. First [[https://karaf.apache.org/manual/latest/quick-start.html#_quick_start][download and install apache karaf]]
 2. In the apache karaf command line, install the features that pulls in the servlets with their dependencies
    #+BEGIN_EXAMPLE
      feature:repo-add mvn:no.priv.bang.demos.whiteboardwebapi/whiteboard-web-and-api-karaf-demo/LATEST/xml/features
      feature:install webapi
      feature:install webgui
    #+END_EXAMPLE
 3. After this, the servlet will be listening for POST requests, at the local path "/overlap/api/testservice" on the karaf web server, e.g. http://localhost:8181/overlap for a karaf server started locally, with default settings

** To uninstall the counter servlet from karaf

This is how to uninstall the servlet from karaf:
 1. At the karaf console prompt, give the following command:
    #+BEGIN_EXAMPLE
      feature:uninstall webapi
    #+END_EXAMPLE

This will cause repeated clicks on the "Increment" button to result in 405 responses, because the webgui servlet now intercepts the requests, but that servlet doesn't support the POST requests used to increment the counter.

Reinstalling the webapi feature will cause the count to start again from 0.

** License

This software project is licensed under Apache License v. 2.

See the LICENSE file for details.
